import httpUtils from "@/core/utils/http.utils";
// service path
const urls = {
    'getIpPage': `/api/upms/ip/page`,
    'getIpById': `/api/upms/ip/`,
    'saveIp': `/api/upms/ip`,
    'updateIpById': `/api/upms/ip`,
    'deleteIpById': `/api/upms/ip/`,
    'IPEffect': `/api/upms/ip/IPEffect`,
    'IPPowerStatus': `/api/upms/ip/IPPowerStatus`,
    'IPPowerSwitch': `/api/upms/ip/IPPowerSwitch`,
};
// service methods
const ipApi = {
    getIpPage (param) {
        return httpUtils.get(urls.getIpPage, param);
    },
    getIpById(id) {
        return httpUtils.get(urls.getIpById + id, {});
    },
    saveIp(param) {
        return httpUtils.postRequest(urls.saveIp, param);
    },
    updateIpById(params) {
        return httpUtils.put(urls.updateIpById, params);
    },
    deleteIp(id) {
        return httpUtils.delete(urls.deleteIpById + id);
    },
    IPEffect (param) {
        return httpUtils.get(urls.IPEffect, param);
    },
    IPPowerStatus (param) {
        return httpUtils.get(urls.IPPowerStatus, param);
    },
    IPPowerSwitch (param) {
        return httpUtils.post(urls.IPPowerSwitch, param);
    },

};

export default ipApi;
